﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="table.aspx.cs" Inherits="测试_table" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Table表头设计</title>
    <link href="../css/SIS.css" rel="stylesheet" type="text/css" />

    <script src="../Js/jquery-1.6.2.js" type="text/javascript"></script>

    <script type="text/javascript" language="javascript">

        $(document).ready(function(){
            $("#btnSearch").click(function() {
               $.post("table.aspx", { param: 'query', row: $("#txtrow").val(), column: $("#txtcolumn").val()}, function (data) {
                    $("#dvShow").html(data.tableinfo);
                    $("#dvShow").show();
               }, 'json');
            });     
            $("#btnSave").click(function() {
               $.post("table.aspx", { param: 'save', rowStart: $("#txtRowStart").val(), rowEnd: $("#txtRowEnd").val(), columnStart: $("#txtColumnStart").val(), columnEnd: $("#txtColumnEnd").val()}, function (data) {
                    $("#dvShow").html(data.tableinfo);
                    $("#dvShow").show();
               }, 'json');
            });      
        });
        
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <table style="width: 90%; left: 200px;">
        <tr>
            <td align="left" valign="middle">
                &nbsp; &nbsp
                <label id="lblrow" style="height: 30px;" runat="server">
                    表格行数:</label>
                &nbsp; &nbsp; &nbsp;
                <input type="text" id="txtrow" style="text-align: center;" runat="server" />
                &nbsp; &nbsp
                <label id="lblcolumn" style="height: 30px;" runat="server">
                    表格列数:</label>
                <input type="text" id="txtcolumn" style="text-align: center;" runat="server" />
                &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                <input id="btnSearch" type="button" value="设  置" style="height: 22px" class="nvinput" />
            </td>
        </tr>
    </table>
    <div id="dvShow">
    </div>
    <table style="width: 90%; left: 200px;">
        <tr>
            <td align="left" valign="middle">
                &nbsp; &nbsp
                <label id="Label1" style="height: 30px;" runat="server">
                    合 并 第:</label>
                &nbsp; &nbsp; &nbsp;
                <input type="text" id="txtRowStart" style="text-align: center;" runat="server" />
                行&nbsp; &nbsp
                <label id="Label2" style="height: 30px;" runat="server">
                    到:</label>
                <input type="text" id="txtRowEnd" style="text-align: center;" runat="server" />
                行&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
            </td>
        </tr>
        <tr>
            <td align="left" valign="middle">
                &nbsp; &nbsp
                <label id="Label3" style="height: 30px;" runat="server">
                    合 并 第:</label>
                &nbsp; &nbsp; &nbsp;
                <input type="text" id="txtColumnStart" style="text-align: center;" runat="server" />
                列&nbsp; &nbsp
                <label id="Label4" style="height: 30px;" runat="server">
                    到:</label>
                <input type="text" id="txtColumnEnd" style="text-align: center;" runat="server" />
                列&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
            </td>
        </tr>
        <tr>
            <td align="left" valign="middle">
                <input id="btnSave" type="button" value="修  改" style="height: 22px" class="nvinput" />
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
